package jvm.t1;

/**
 * Remarks:演示栈内存溢出
 * Class name :Demo1_2
 * Date :2023/2/8 13:42
 * Author:杨俊源
 */
public class Demo1_2 {

    private static int count;

    public static void main(String[] args) {
        try {
            method1();
        } catch (Throwable e) {
            e.printStackTrace();
            System.out.println(count);
        }
    }

    private static void method1() {
        count++;
        method1();
    }
}
